package com.docking.heylo.service.impl;

import com.docking.heylo.dao.mapper.PayOrderMapper;
import com.docking.heylo.service.IPayOrderService;
import com.docking.heylo.web.dto.PayOrderDto;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Map;

@Service
public class PayOrderServiceImpl implements IPayOrderService {

    @Resource
    private PayOrderMapper payOrderMapper;

    @Override
    public PageInfo<Map<String, Object>> orderList(PayOrderDto orderDto) {
        PageHelper.startPage(orderDto.getPageNumber(), orderDto.getSize());
        return new PageInfo<>(payOrderMapper.orderList(orderDto.getStatus()));
    }
}
